<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'test.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <ul id="MenuUl">
    
				<%-- 显示一级菜单 --%>
				<s:iterator value="#session.user.role">
				  <s:iterator value="privilege">
				
				 <s:if test="children.size()!=0">
					<li class="level1">
					 
					<div onClick="menuClick(this);" class="level1Style">
					<c:forEach var="p" items="${pids}">
				     <c:if test="${p == id}">
				      ${name}
				      </c:if>
				     </c:forEach>
						</div>
										
						<ul style="" class="MenuLevel2" id="aa">
							<%-- 显示二级菜单 --%>
							<s:if test="parent"></s:if>
							<s:iterator value="children">
								 <c:forEach var="p" items="${pids}">
				                         <c:if test="${p == id}">
								<li class="level2">
									<div class="level2Style">
<!-- 										<a target="right" href="${pageContext.request.contextPath}${url}"> ${name}</a> -->
									
				                           ${name}
				                       
									</div>
								</li>
								 </c:if>
				                      </c:forEach>
							</s:iterator> 
						</ul> 
					</li>
					</s:if>
				  </s:iterator>
				</s:iterator>
				<%-- </s:iterator>
				<s:iterator value="#session.Privilege">
					
					<s:if test="children.size()!=0">
					<li class="level1">
					 
					<div onClick="menuClick(this);" class="level1Style">
							${name}
						</div>
										
						<ul style="" class="MenuLevel2" id="aa">
							显示二级菜单
<!-- 							${parent.name} -->
							<s:if test="parent"></s:if>
							<s:iterator value="children">
								<li class="level2">
									<div class="level2Style">
										<a target="right" href="${pageContext.request.contextPath}${url}"> ${name}</a>
									</div>
								</li>
							</s:iterator> 
						</ul> 
					</li>
					</s:if>	 
				</s:iterator>
			</ul> --%>
			<s:debug></s:debug>
  </body>
</html>
